import hzcRequest from "../../../utils/https";

// 查询全部商品分类
// const getHomePage = (data) => {
//    return hzcRequest.post(`/h5Shop/api/ln/getHomePage`,data)
// };

// 活动配置

const getConfig = (data) => {
  return hzcRequest.post(`/getConfig`, data)
}

// 活动列表
const getActivityPage = (data) => {
  return hzcRequest.post(`/getActivityPage`, data)
}
// 历史记录
const getHistoryPage = (data) => {
  return hzcRequest.post(`/getHistoryPage`, data)
}
//活动详情
const getActivityDetails = (data) => {
  return hzcRequest.post(`/getActivityDetails`, data)
}

// getJumpshopUrl 获取跳转商城链接
const getJumpShopUrl = (data) => {
  return hzcRequest.post(`/getJumpShopUrl`, data)
}

// beginActivity
//进入活动
const beginActivity = (data) => {
  return hzcRequest.post(`/beginActivity`, data)
}

//完成活动
const finishActivity = (data) => {
  return hzcRequest.post(`/finishActivity`, data)
}

//10.小程序获取SessionKey
const getSessionKey = (data) => {
  return hzcRequest.post(`/getSessionKey`, data)
}

//11.小程序解析微信步数
const grantWxStep = (data) => {
  return hzcRequest.post(`/grantWxStep`, data)
}


//完成活动
const punchActivity = (data) => {
  return hzcRequest.post(`/punchActivity`, data)
}


//完成活动
const signActivity = (data) => {
  return hzcRequest.post(`/signActivity`, data)
}
//完成活动{}


const punchAction = (data) => {
  return hzcRequest.post(`/punchAction`, data)
}


//提交答案(做题类)
const submitAnswer = (data) => {
  return hzcRequest.post(`/submitAnswer`, data)
}

const getUserInfo = (data) => {
  return hzcRequest.post(`/getUserInfo`, data)
}

const updateUserInfo = (data) => {
  return hzcRequest.post(`/updateUserInfo`, data)
}

const getPointRankPage = (data) => {
  return hzcRequest.post(`/getPointRankPage`, data)
}




export {
  updateUserInfo,
  punchAction,
  getPointRankPage,
  getConfig, getActivityPage, getHistoryPage, beginActivity, getActivityDetails, finishActivity, getSessionKey, grantWxStep, punchActivity, signActivity, submitAnswer, getJumpShopUrl, getUserInfo
};
